<template>
  <component
      :is="component"
      v-model="bean[prop]"
      :field="field"
      :disabled="disabled"
  ></component>
</template>

<script setup lang="ts">
import {computed} from "vue";
import type {MetaField, DataItem} from "../../types/cell.types";
import useCellComponents from "./useCellComponents";

const props = defineProps<{
  field: MetaField,
  bean: DataItem,
  disabled: boolean,
}>()

const prop = computed(() => props.field.prop)
const { component } = useCellComponents(props.field)

</script>

<style scoped>

</style>